<%--
 *  File:    PageConfigDetailInfo.jsp
 *  @Author: banshang	
 *  Date:    2010/6/25
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%  
  //init param
  Category cat = Category.getInstance("jsp.PageConfigDetailInfo");
  String strModuleName = "IMG";
  String strTableName = "ovorgrelationdetail";
  String privilegeCode = "ZB0107";
  String contextPath = request.getContextPath();

%>

<% //--------------------------------------  include files list --%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<%@include file="/inc/Print.inc"%>

  

<html>
<head>
<title>PageConfigDetailInfo</title>
<PageFlow:CheckPageFlow pageName="p_pageconfigdetail"/>
<!-- GetUsableColumn.inc get all usable column -->
<%@ include file="/inc/GetUsableColumn.inc" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath %>/css/cn/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>

<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file="/inc/SummaryDivision.inc" %> 
  
<script>

function page_add(){
	var span = document.getElementById("newdetail");
	
	document.cform.actionname.value="add";
	document.cform.target="_self"
	isRunning = true;
	document.cform.submit();
}
function page_delete(){
	if(!confirm("<%= message.getMessageDesc("ARE_YOU_SURE_DEL")%>")) return;
	document.cform.actionname.value="delete";
	document.cform.target="_self"
	isRunning = true;
	document.cform.submit();
}
function page_save(){
	document.cform.actionname.value="save";
	document.cform.target="_self"
	isRunning = true;
	document.cform.submit();
}
function page_back(){
	parent.location.href="PageConfigSummary.jsp?<%= OvalTools.randomURL() %>";
}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="100%" cellspacing="0" cellpadding="0" border="0">
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher">
		    <input type="hidden" name="pagename" value="p_pageconfigdetail">
		    <input type="hidden" name="actionname">
		    <input type="hidden" name="IsEdit">
			<input type="hidden" name="numrows" value="<%=pageconfigdetails.size() %>">
	  		<input type="hidden" name="value">
	  <custom:hidden name="orginfo" property="orgid"/>
      <custom:hidden name="orginfo" property="orgcode"/>
      <custom:hidden name="orginfo" property="orgname"/>


	
      <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellpadding="0" width="100%">


          <tr class="deepblue-left">
            <td width="22" class="title_center" >&nbsp;</td>
            <td width="50" class="title_center" ><%= label.getLabelName("L_SortNO")%></td>
            <td width="15%" class="title_center" ><%= label.getLabelName("L_FieldName")%></td>
            <td class="15%" class="title_center"><%= label.getLabelName("L_Title") %></td>
            <td width="15%" class="title_center"><%= label.getLabelName("L_YorN") + label.getLabelName("L_Hidden")%></td>
            <td width="15%" class="title_center"><%= label.getLabelName("L_YorN") + label.getLabelName("L_LinkURL")%></td>
            <td width="*" class="title_center" ><%= label.getLabelName("L_LinkURL") %></td>
          </tr>
          <%
             int j = 0;
             Integer idx = new Integer(-1);
          %>
          <logic:iterate id="pageconfigdetail" collection="<%= pageconfigdetails %>" >
          	<%
            HashMap onedetail = (HashMap)pageContext.getAttribute("pageconfigdetail");
          	String isHiddenCheck = "Y".equals((String)onedetail.get("ishidden")) ? "checked" : "";
          	String hasUrlCheck = "Y".equals((String)onedetail.get("hasurl")) ? "checked" : "";
          	String urlDisplay = "Y".equals((String)onedetail.get("hasurl")) ? "border:solid black 1px;" : "border:0px;";
          	String urlCommond = "Y".equals((String)onedetail.get("hasurl")) ? "notnull" : "";
          	boolean urlReadonly = !("Y".equals((String)onedetail.get("hasurl")));
            j++;
            idx = new Integer(j-1);
            String isHidden = "isHidden("+idx.intValue()+")";
            String hasUrl = "hasUrl("+idx.intValue()+")";
          %>
          	<tr>
	            <td width="5%">
	              <custom:checkbox disabled="true" name="pageconfigdetail" property="pageconfigdetailid" changedName="pageconfigdetailids" style="border:0px;"></custom:checkbox>
	              <custom:hidden name="pageconfigdetail" property="pageconfigdetailid" colIndex="<%=idx %>"/>
	            </td>											   
	            <td>
	            	<custom:write name="pageconfigdetail" property="columnstno" nbsp="true"/>
	            </td>
	            <td>
	            	<custom:write name="pageconfigdetail" property="fieldname" nbsp="true"/>
	            </td>
	            <td><custom:write name="pageconfigdetail" property="fieldtitledisplay"/></td>
	            <td class="td_center">
	            	<custom:hidden name="pageconfigdetail" property="ishidden" colIndex="<%=idx %>"/>
	            	<input type="checkbox" <%=isHiddenCheck %> disabled="disabled" name="ishiddencheck<%=idx %>"  style="border:0px;" >
	            </td>
	            <td class="td_center">
	            	<custom:hidden name="pageconfigdetail"  property="hasurl" colIndex="<%=idx %>"/>
	            	<input type="checkbox" <%=hasUrlCheck %> disabled="disabled"  name="hasurlcheck<%=idx %>"  style="border:0px;" >
	            </td>
	            <td>&nbsp;<custom:write  name="pageconfigdetail" property="url" /></td>
	           
	         </tr>
	         
          </logic:iterate>
          <custom:hidden property="pageconfigid"></custom:hidden>
          

    <% //--------------------------------------  flipping page --%>
    <table width="100%">
        <tr> 
          <td class="summary_top"></td>
        </tr>
		<tr >
			<td class="td_center">
	            <!-- a onclick="page_add()"><custom:button type="1" label="L_Add" imgsrc="new.gif" border="0" style="width:60"/></a>
	            <a onclick="page_save()"><custom:button type="1" label="L_Save" imgsrc="edit.gif" border="0" style="width:60"/></a>
	            <a onclick="page_delete()"><custom:button type="1" label="L_Delete" imgsrc="delete.gif" border="0" style="width:60"/></a>
	          	 -->
	          	<a onclick="page_back()"><custom:button type="1" label="L_Back" imgsrc="delete.gif" border="0" style="width:60"/></a>
	          </td>
	          
		</tr>
	</table>	
   </table>
</form>
</table>

</body>
</html>


